package com.tpyule.tpclass.dao;

import com.tpyule.tpclass.entity.pojo.Studied;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author zzz
 * @version 1.0
 * @date 2020/4/16 16:34
 */
@Mapper
public interface StudiedDao {
    public int addStudied(Studied studied);

    public int updateStudied(Studied studied);

    /**
     * 寻找正在学习的课程
     * @param userId
     * @param courseId
     * @return
     */
    public Studied getLastStudied(@Param("userId") String userId, @Param("courseId") String courseId);

    /**
     * 根据节ID和用户ID查找是否学过
     * @param userId
     * @param sectionId
     * @return
     */
    public Studied getStudiedBySU(@Param("userId") String userId, @Param("sectionId") String sectionId);

}
